/*
 * Copyright (c) 2006, 2021, webrx.cn All rights reserved.
 *
 */
package cn.webrx;

import java.util.Calendar;
import java.util.Date;

/**
 * <p>Project: javase - Var6
 * <p>Powered by webrx On 2021-11-22 09:56:50
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Var6 {
    public static void main(String[] args) {
        //01 实例化java.util.Date类
        //Date d1 = new Date();
        //int h1 = d1.getHours();

        //02 日历类
        Calendar c = Calendar.getInstance();
        //h1 = c.get(Calendar.HOUR_OF_DAY);
        int h1 = c.get(11);

        if (h1 < 12) {
            System.out.println("上午好");
        } else {
            System.out.println("下午好");
        }
    }
}
